import { IntersectionType, OmitType, PartialType } from '@nestjs/swagger'
import { Download } from '@/modules/download/entities/download.entity'
import { ListPaginationDto } from '@/shared/types/globalDto.dto'

export class CreateDownloadDto extends OmitType(PartialType(Download), ['downloadId', 'createdAt', 'updatedAt']) {}

export class UpdateDownloadDto extends CreateDownloadDto {}

export class FindOneDownloadDto extends PartialType(Download) {}

export class ListPageDownloadDto extends PartialType(IntersectionType(FindOneDownloadDto, ListPaginationDto)) {}

export class WebListPageDownloadDto extends ListPageDownloadDto {}
export class ListPaginationDownloadVo {
  total: number
  list: Download[]
}
